<template>
	<view>
		<item :data="data[0]" @postComment="comment" @share="share" @praise="praise" :commentFrame="true" userLink="">
		</item>
	</view>
</template>

<script>
	import json from "@/static/infos.js"
	import item from "@/components/Circle/Circle.vue"
	export default {
		components: {
			item
		},
		data() {
			return {
				data: {}
			};
		},
		onLoad() {
			this.data = json
		},
		methods: {
			//评论
			comment(e) {
				this.data[0].comments.push({
					"id": 1,
					"releaseInfoId": 1,
					"fromUserId": "",
					"toUserId": "",
					"content": e.text,
					"created": ""
				})
				uni.showToast({
					title: 'success',
					duration: 2000
				});
			},
			//分享
			share(id) {
				uni.showToast({
					title: 'success',
					duration: 2000
				});
			},
			//点赞
			praise(id) {
				uni.showToast({
					title: 'success',
					duration: 2000
				});
			}
		}
	}
</script>

<style lang="scss">

</style>
